<?php

class Util {
    public static function redirect(){
        header("Location: home.php");
    }
    public static function redirectLog(){
        header("Location: index.php");
    }
    public static function logoutRedirect(){
        header("Location: registrato.php");
    }
    public static function NotRedirect(){
        header("Location: #");
    }
    public static function photoRedirect(){
        header("Location: profilo.php?action=modifica.php");
    }
    public static function redirectAdmin(){
        header("Location: admin/page/ahome.php");
    }

    public static function getPage(){
        $path=$_SERVER['PHP_SELF'];
        //echo $path;
        $pagetmp = explode("/", $path);
        $tmp= $pagetmp[count($pagetmp)-1];
        $page = explode(".", $tmp);
        $current_page = $page[0];

        return $current_page;
    }
}
?>
